package gamecenter.gc.service.Imp;

import gamecenter.gc.bean.Comment;
import gamecenter.gc.mapper.Comment_Mapper;
import gamecenter.gc.service.Comment_Service;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;


@Service
public class Comment_Service_Imp implements Comment_Service {
    @Resource
    private Comment_Mapper comment_mapper;


    @Override
    public boolean has_Comment(String user_name, String game_name) {
        Comment comment = comment_mapper.get_Comment(user_name, game_name);
        return comment != null;
    }

    @Override
    public List<Comment> get_all_On_Comment() {
        return comment_mapper.get_all_On_Comment();
    }

    @Override
    public Comment get_Comment(String user_name, String game_name) {
        return comment_mapper.get_Comment(user_name, game_name);
    }

    @Override
    public List<Comment> get_Game_Comment(String game_name) {
        return comment_mapper.get_Game_Comment(game_name);
    }

    @Override
    public void add_Comment(Comment com) {
        comment_mapper.add_Comment(com);
    }

    @Override
    public void modify_Comment(Comment com) {
        comment_mapper.modify_Comment(com);
    }

    @Override
    public void del_Comment(Comment com) {
        comment_mapper.del_Comment(com);
    }
}
